import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class MemberBenefits extends StatelessWidget {
  final List<Map<String, String>> benefits = const [
    {
      'icon': 'assets/images/vip_no_ads.png',
      'title': 'No advertisements',
    },
    {
      'icon': 'assets/images/vip_hd.png',
      'title': 'High definition',
    },
    {
      'icon': 'assets/images/vip_all_videos.png',
      'title': 'Watch all videos',
    },
    {
      'icon': 'assets/images/vip_advance.png',
      'title': 'Watch in advance',
    },
  ];

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: 60.h, bottom: 80.h),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Padding(
            padding: EdgeInsets.symmetric(horizontal: 30.w),
            child: Text(
              'Member Benefits',
              style: TextStyle(
                color: Colors.white,
                fontSize: 40.sp,
                fontWeight: FontWeight.bold,
              ),
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: 38.h),
            padding: EdgeInsets.symmetric(horizontal: 30.w),
            child: Wrap(
              spacing: 20.w,
              runSpacing: 40.h,
              children: benefits.map((benefit) {
                return SizedBox(
                  width: 335.w,
                  child: Column(
                    children: [
                      Center(
                        child: Image.asset(
                          benefit['icon']!,
                          width: 100.w,
                          height: 100.h,
                        ),
                      ),
                      SizedBox(height: 20.h),
                      Text(
                        benefit['title']!,
                        style: TextStyle(
                          color: Colors.grey,
                          fontSize: 28.sp,
                        ),
                      ),
                    ],
                  ),
                );
              }).toList(),
            ),
          ),
        ],
      ),
    );
  }
}
